package trees;

import java.util.ArrayList;
import java.util.List;

public class AttributeTree implements AttributeNode{
	
	private Integer attribute;
	List<AttributeNode> children;
	private AttributeNode parent;
	private int positionWithinSiblings;
	
	@Override
	public int getPositionWithinSiblings() {
		return positionWithinSiblings;
	}

	@Override
	public void setPositionWithinSiblings(int positionWithinSiblings) {
		this.positionWithinSiblings = positionWithinSiblings;
	}
	
	public AttributeTree(Integer attribute, List<AttributeNode> children){
		this.attribute = attribute;
		this.children = children;
	}	
	
	public void setParent(AttributeNode parent) {
		this.parent = parent;
	}

	public AttributeTree(Integer attribute){
		this.attribute = attribute;
		this.children = new ArrayList<AttributeNode>();
	}		
	
	public void setChildren(List<AttributeNode> children) {
		this.children = children;
	}	
	
	@Override
	public List<AttributeNode> getChildren() {
		return children;
	}

	@Override
	public int getAttribute() {
		return attribute;
	}

	@Override
	public AttributeNode getParent() {
		return parent;
	}
}